package com.itheima.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @version 1.0
 * @description 敏感词实体类
 * @package com.itheima.admin.pojo
 */
@Data
@TableName("ad_sensitive")
@ApiModel(description = "敏感词实体")
public class AdSensitive {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(notes = "主键id",dataType = "Integer")
    private Integer id;

    @TableField("sensitives")
    @ApiModelProperty(notes = "敏感词名称",dataType = "String")
    @NotBlank(message = "敏感词长度不能为空")
    @Length(min = 1,max = 10,message = "敏感词长度不能为空")
    private String sensitives;


    @TableField("created_time")
    @ApiModelProperty(notes = "创建时间",dataType = "LocalDate")
    private LocalDateTime createdTime;
}